package com.hubei.car.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.sql.Timestamp;
import java.util.List;

/**
 * 产品目录
 * @author huanghaisheng
 * @create 2019-11-26
 */
@ApiModel(value="产品目录")
@Data
@TableName(value = "ms_product_type")
@Accessors(chain = true)
public class MsProductType {

    @TableId(value = "id",type = IdType.AUTO)
    @ApiModelProperty(value="产品目录id")
    private Long id;

    @TableField(value = "name")
    @ApiModelProperty(value = "产品目录名称", required = true)
    private String name;

    @TableField(value = "pid")
    @ApiModelProperty(value = "父id")
    private Long pid;

    @TableField(value = "createdate")
    @ApiModelProperty(value = "创建日期", hidden = true)
    private Timestamp createdate;

    @TableField(value = "createid")
    @ApiModelProperty(value = "创建人id", hidden = true)
    private Long createid;

    @TableField(value = "createname")
    @ApiModelProperty(value = "创建人名字", hidden = true)
    private String createname;

    @TableField(value = "defaultimages")
    @ApiModelProperty(value = "产品目录默认图")
    private String defaultimages;

    @TableField(value = "istop")
    @ApiModelProperty(value="是否置顶")
    private Boolean istop;

    @TableField(value = "isrecommend")
    @ApiModelProperty(value="是否推荐")
    private Boolean isrecommend;

    @TableField(value = "isstop")
    @ApiModelProperty(value="是否禁用")
    private Boolean isstop;

    @TableField(value = "sort")
    @ApiModelProperty(value="排序")
    private Integer sort;

    @TableField(exist = false)
    @ApiModelProperty(value="子目录集合", hidden = true)
    private List<MsProductType> sonMsProductTypes;

}
